<template>
	<view class="box">
		<view class="sp">
			<image src="../../static/logo.png" mode=""></image>
			<view class="rightbox">
				<view class="name">
					2021年最新款
				</view>
				<view class="size">
					<text>灰色xl</text>
					<text>￥1200</text>
				</view>
			</view>
		</view>
		<view class="hr"></view>
		<view class="grade">
			<view class="smallbox" v-for="(item,index) in rmklist" :key="index" @click="select(index)">
				<image :src="current==index?item.selectimg:item.img" mode=""></image>
				<text :class="current==index?'selectpj':'pj'">{{item.name}}</text>
			</view>
		</view>
		<view class="remark">
			<textarea value="" placeholder="说点什么吧...." />
			<!-- <BaseUpdate></BaseUpdate> -->
		</view>
		<view class="hrs"></view>
		<view class="radiobox">
			<u-checkbox-group>
				<u-checkbox shape="circle" @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index"
					:name="item.name">{{item.name}}</u-checkbox>
			</u-checkbox-group>
		</view>

		<view class="pjs">
			提交评价
		</view>
	</view>
</template>

<script>
	import BaseUpdate from "../../components/BaseUpdate/index.vue"
	export default {
		data() {
			return {
				rmklist: [{
					name: "好评",
					selectimg: "../../static/形状6.png",
					img: "../../static/图层17.png"
				}, {
					name: "中评",
					selectimg: "../../static/形状6.png",
					img: "../../static/图层17.png"
				}, {
					name: "差评",
					selectimg: "../../static/形状6.png",
					img: "../../static/图层17.png"
				}],
				current: 0,
				list: [{
					name: '匿名评价',
					disabled: false,
					checked: false,
				}],
			}
		},
		methods: {
			select(v) {
				this.current = v
			},
			checkboxChange(e){
				console.log(e)
			}
		},
		components: {
			BaseUpdate
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #fff;
		padding-top: 132rpx;

		.sp {
			display: flex;
			align-items: center;
			margin-left: 50rpx;

			image {
				width: 90rpx;
				height: 86rpx;
				border-radius: 4rpx;
				border: solid 1rpx #dcdcdc;
			}

			.rightbox {
				margin-left: 20rpx;

				.name {
					font-family: MicrosoftYaHei;
					font-size: 28rpx;
					color: #282828;
					font-weight: 700;
				}

				.size {
					font-family: MicrosoftYaHei;
					font-size: 22rpx;
					color: #5e5e5e;
					margin-top: 20rpx;

					text {
						margin-right: 30rpx;
					}
				}
			}
		}

		.grade {
			display: flex;
			justify-content: space-around;
			align-items: center;
			font-size: 30rpx;
			margin-top: 37rpx;

			.smallbox {
				display: flex;
				align-items: center;

				.pj {
					color: #999999;
					margin-left: 15rpx;
				}

				.selectpj {
					color: #f7331f;
					margin-left: 15rpx;
				}

				image {
					width: 34rpx;
					height: 35rpx;
				}
			}
		}

		.hr {
			width: 692rpx;
			height: 3rpx;
			border: solid 1rpx #eeeeee;
			margin: 0 auto;
			margin-top: 36rpx;
		}

		.remark {
			padding: 38rpx 53rpx;
			box-sizing: border-box;

			textarea {
				font-family: SourceHanSansCN-Regular;
				font-size: 24rpx;
				width: 660rpx;
			}
		}

		.hrs {
			width: 690rpx;
			height: 13rpx;
			background-color: #f7f7f7;
			margin: 0 auto;
			margin-top: 20rpx;
		}

		.pjs {
			width: 538rpx;
			height: 90rpx;
			background-color: #f73f33;
			border-radius: 45rpx;
			line-height: 90rpx;
			text-align: center;
			font-family: SourceHanSansCN-Regular;
			font-size: 36rpx;
			color: #ffffff;
			margin: 0 auto;
			margin-top: 168rpx;
		}

		.radiobox {
			margin-left: 560rpx;
		}
	}
</style>
